package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:09 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductRequirementChangeLogBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductRequirementChangeLog
      productRequirementChangeLog;

  protected BeanMap getBeanMap() {

    return new BeanMap(productRequirementChangeLog);
  }

  static {
    mappedDaoFields.put(
        "id", com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.Id);

    mappedDaoFields.put(
        "productRequirementId",
        com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.ProductRequirementId);

    mappedDaoFields.put(
        "beforeChangeContent",
        com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.BeforeChangeContent);

    mappedDaoFields.put(
        "afterChangeContent",
        com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.AfterChangeContent);

    mappedDaoFields.put(
        "editorId", com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.EditorId);

    mappedDaoFields.put(
        "editDate", com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.EditDate);

    mappedDaoFields.put(
        "changeReason",
        com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.ChangeReason);

    mappedDaoFields.put(
        "approverId",
        com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.ApproverId);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductRequirementChangeLogDAO.Remarks);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductRequirementChangeLogBean() {
    super();

    this.productRequirementChangeLog =
        new com.ourteam.product.requirement.dao.ProductRequirementChangeLog();
  }

  public ProductRequirementChangeLogBean(
      com.ourteam.product.requirement.dao.ProductRequirementChangeLog productRequirementChangeLog) {
    super();

    this.productRequirementChangeLog = productRequirementChangeLog;
  }

  public com.ourteam.product.requirement.dao.ProductRequirementChangeLog
      convertToProductRequirementChangeLog() {
    return this.productRequirementChangeLog;
  }

  public com.ourteam.product.requirement.dao.ProductRequirementChangeLog convertTo() {
    return this.productRequirementChangeLog;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productRequirementChangeLog.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productRequirementChangeLog.setId(id);
  }

  /**
   * Get productRequirementId
   *
   * @return long
   */
  public long getProductRequirementId() {
    return (long) this.productRequirementChangeLog.getProductRequirementId();
  }

  /**
   * Set productRequirementId
   *
   * @parameter long
   */
  public void setProductRequirementId(long productRequirementId) {

    this.productRequirementChangeLog.setProductRequirementId(productRequirementId);
  }

  /**
   * Get beforeChangeContent
   *
   * @return String
   */
  public String getBeforeChangeContent() {
    return (String) this.productRequirementChangeLog.getBeforeChangeContent();
  }

  /**
   * Set beforeChangeContent
   *
   * @parameter String
   */
  public void setBeforeChangeContent(String beforeChangeContent) {

    this.productRequirementChangeLog.setBeforeChangeContent(beforeChangeContent);
  }

  /**
   * Get afterChangeContent
   *
   * @return String
   */
  public String getAfterChangeContent() {
    return (String) this.productRequirementChangeLog.getAfterChangeContent();
  }

  /**
   * Set afterChangeContent
   *
   * @parameter String
   */
  public void setAfterChangeContent(String afterChangeContent) {

    this.productRequirementChangeLog.setAfterChangeContent(afterChangeContent);
  }

  /**
   * Get editorId
   *
   * @return long
   */
  public long getEditorId() {
    return (long) this.productRequirementChangeLog.getEditorId();
  }

  /**
   * Set editorId
   *
   * @parameter long
   */
  public void setEditorId(long editorId) {

    this.productRequirementChangeLog.setEditorId(editorId);
  }

  /**
   * Get editDate
   *
   * @return java.util.Date
   */
  public java.util.Date getEditDate() {
    return (java.util.Date) this.productRequirementChangeLog.getEditDate();
  }

  /**
   * Set editDate
   *
   * @parameter java.util.Date
   */
  public void setEditDate(java.util.Date editDate) {

    this.productRequirementChangeLog.setEditDate(editDate);
  }

  /**
   * Get changeReason
   *
   * @return String
   */
  public String getChangeReason() {
    return (String) this.productRequirementChangeLog.getChangeReason();
  }

  /**
   * Set changeReason
   *
   * @parameter String
   */
  public void setChangeReason(String changeReason) {

    this.productRequirementChangeLog.setChangeReason(changeReason);
  }

  /**
   * Get approverId
   *
   * @return long
   */
  public long getApproverId() {
    return (long) this.productRequirementChangeLog.getApproverId();
  }

  /**
   * Set approverId
   *
   * @parameter long
   */
  public void setApproverId(long approverId) {

    this.productRequirementChangeLog.setApproverId(approverId);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productRequirementChangeLog.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productRequirementChangeLog.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productRequirementChangeLog.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productRequirementChangeLog.setRemarks(remarks);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductRequirementChangeLogBean) == false) {
      return false;
    } // end if

    ProductRequirementChangeLogBean other = (ProductRequirementChangeLogBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductRequirementChangeLog
        tempProductRequirementChangeLog = other.convertToProductRequirementChangeLog();

    if (tempProductRequirementChangeLog == null || this.productRequirementChangeLog == null) {
      isEqual = false;
    } else if (tempProductRequirementChangeLog == this.productRequirementChangeLog
        || tempProductRequirementChangeLog.equals(this.productRequirementChangeLog)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductRequirementChangeLogBean[] toArray(
      com.ourteam.product.requirement.dao.ProductRequirementChangeLog[]
          aProductRequirementChangeLogs) {

    return toArray(aProductRequirementChangeLogs, null);
  }

  public static ProductRequirementChangeLogBean[] toArray(
      com.ourteam.product.requirement.dao.ProductRequirementChangeLog[]
          aProductRequirementChangeLogs,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductRequirementChangeLogs)) {
      return new ProductRequirementChangeLogBean[0];
    }

    int length = aProductRequirementChangeLogs.length;

    ProductRequirementChangeLogBean[] beans = new ProductRequirementChangeLogBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductRequirementChangeLogBean(aProductRequirementChangeLogs[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductRequirementChangeLogs[i]});
      }
    }

    return beans;
  }
}
